﻿@foreach (var item in Model.CommentList)
{
    <tr>
        <td colspan="5" class="OrderNumber">
            <h3>订单编号: @item.OrderNumber</h3>
            商品编号：<a href="~/Product/ProductDetail?prd=@item.ProductId">@item.ProductId</a> 购买日期:@item.InDate
        </td>
    </tr>
    <tr>
        <td class="img">
            <a href="~/Product/ProductDetail?prd=@item.ProductId">
                <img src="@RiderShop.Mobile.Common.Component.SiteUrl.FormatProductImageUrl(Kevin.Shop.Business.Service.Entity.Products.Enumerations.ImageType.Size125, item.ProductId, item.ImageName)" class="favThum">
            </a>
        </td>
        <td class="title"><a href="~/Product/ProductDetail?prd=@item.ProductId">@item.ProductName</a></td>
        <td class="price">￥@item.UnitPrice</td>
        <td class="point">@item.PresentPoint</td>
        <td class="action">
            @if (string.IsNullOrEmpty(item.PresentPointDisplay))
            {
                <a href="~/MyAccount/PublishComment?prd=@item.ProductId&orderNumber=@item.OrderNumber" class="btn_gray"><i class="fa fa-pencil"></i> 发表评论</a>
            }
            else
            {
                <a class="btn_gray" id="viewMycomment" href="#@Html.Raw(@item.OrderNumber + '_' + @item.ProductId)"><i class="fa fa-bars"></i> 查看评论</a>
                <div id="@Html.Raw(@item.OrderNumber + '_' + @item.ProductId)" style="display:none" class="view-mycomment">
                    <h3>评论信息</h3>
                    <table>
                        <tr>
                            <td colspan="2">
                                <div class="star-line">
                                    <label class="@Html.Raw("re" + @item.Rating)" id="lblRatingLevel">
                                        <ul>
                                            <li></li>
                                            <li></li>
                                            <li></li>
                                            <li></li>
                                            <li></li>
                                        </ul>
                                        <span class="retext">
                                            @if (@item.Rating == 1)
                                            {
                                                @Html.Raw("非常差");
                                            }
                                            else if (@item.Rating == 2)
                                            {
                                                @Html.Raw("比较差");
                                            }
                                            else if (@item.Rating == 3)
                                            {
                                                @Html.Raw("一般");
                                            }
                                            else if (@item.Rating == 4)
                                            {
                                                @Html.Raw("比较好");
                                            }
                                            else if (@item.Rating == 5)
                                            {
                                                @Html.Raw("很好");
                                            }
                                        </span>
                                    </label>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <th>标题：</th>
                            <td>@item.Title</td>
                        </tr>
                        <tr>
                            <th>优点：</th>
                            <td>@item.MeritText</td>
                        </tr>
                        <tr>
                            <th>不足：</th>
                            <td>@item.FaultsText</td>
                        </tr>
                        <tr>
                            <th>描述：</th>
                            <td>@item.Memo</td>
                        </tr>
                        <tr>
                            <th></th>
                            <td><button class="rjbtn rjbtnGray cancel" type="button" onclick="javascript: $.fancybox.close();">关闭</button></td>
                        </tr>
                    </table>
                </div>
            }
        </td>
    </tr>
}